<template>
    <div class="Avie_normal_sample">
        <div class="Avie_table_box">
            <BaseTable v-if="tableReload" @tableReloadHandler="tableReloadHandler" :SelectionSwitch="SelectionSwitch" :IndexSwitch="IndexSwitch" :tableData="tableData" :tableHead="tableHead" @ControlHandler="ControlHandler" />
        </div>
        <div class="Avie_sample_footer">
            <el-pagination :current-page="currentPage" :page-size="currentSize" @size-change="SizeChange" @current-change="PageChange" layout="total,sizes, prev, pager, next, jumper" :total="total"></el-pagination>
        </div>
    </div>
</template>

<script>
// import mixin_ from '@/utils/mixins/mixin_';
// import hasTable from '@/utils/mixins/hasTable';
export default {
    // mixins: [mixin_],
    props: {
        targetId: {
            type: String,
            default: ''
        },
        OperationalName: {
            type: String,
            default: ''
        }
    },
    data() {
        return {
            SelectionSwitch: false,
            tableData: []
        };
    },
    computed: {
        tableHead: function() {
            return [
                {
                    prop: 'createUserName',
                    label: '操作人',
                    align: 'center',
                    width: 150
                },
                {
                    prop: 'createTime',
                    label: '操作时间',
                    align: 'center'
                },
                {
                    prop: 'operationalEvents',
                    label: '操作事件',
                    align: 'center'
                }
            ]
        }
    },
    mounted() {
        this.GetInfo();
    },
    methods: {
        async GetInfo() {
            let info = {
                operationalObjectId: this.targetId,
                pageSize: this.currentSize,
                pageNumber: this.currentPage
            };
            let data_ = await this.TbOperationLogApi.TbOperationLogList(info);
            this.total = data_.data.totalCount;
            this.tableData = data_.data.list.map(el => {
                return el;
            });
        }
    }
};
</script>

<style></style>
